<?php
/**
 * trading_order 数据表模型
 * @author  yuliang <yuliang@pvc123.com>
 */

namespace models;

class TradingOrderModel extends C_Model {
    //pay_way  支付方式(0:大塑支付,1:线下支付)
    const PAY_WAY_ONLINE =0;
    const PAY_WAY_OFFLINE=1;

    //shipping_way 配送方式(0:商家配送,1:自提)
    const SHIPPING_WAY_SELLER =0;
    const SHIPPING_WAY_BUYER =1;

    //add_type 添加类型：0=用户添加，1=运营商添加
    const  ADD_TYPE_USER=0;//用户添加
    const  ADD_TYPE_SELLER=1;//运营商添加

    //order_status 订单状态(0:待用户议价,1:待卖家确认,2:待买家确认,3:待支付,4:待确认收款,5:待发货,6:已发货,7:已完成,8:已取消)
    const WAIT_FOR_USER_BARGAINING =0;
    const WAIT_FOR_MERCHANT_CONFIRMATION =1;
    const WAIT_FOR_USER_CONFIRMATION =2;
    const ORDER_STATUS_UNPAY =3;
    const ORDER_PENDING_RECEIPT =4;
    const ORDER_STATUS_TO_BE_SHIPPED =5;
    const ORDER_STATUS_SHIPPED =6;
    const ORDER_STATUS_COMPLETED =7;
    const ORDER_STATUS_CANCELED =8;

    //order_mode 交易模式(0:直接交易,1:买卖双方确认模式,2:议价模式)

    const DIRECTRADE =0;
    const B2CCONFIRM =1;
    const BARGAINING =2;

    public function __construct() {

        //创建model对象并初始化数据表名称
        parent::__construct('trading_order');

        //设置表数据表主键，默认为id
        $this->setPrimaryKey('id');
		$this->autoPrimary = true;
        

        

    }
} 
